#include "mainwindow.h"

#include <QApplication>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MainWindow w;
    QString style="QPushButton{color:red;}";//常规红色
    style+="QPushButton:hover{color:green;}";//鼠标进入绿色
    style+="QPushButton:pressed{color:blue;}";//按下蓝色
    w.setStyleSheet(style);
    w.show();
    return a.exec();
}
